<style>
    div {
        padding: 5px;
        font-size: 14px;
        text-align: left;
        font-weight: normal;
    }
    
    .row div:nth-child(odd) {
        font-weight: bold;
    }
    
    .container {
        max-width: 100%;
    }
</style>
<div class="container">
    <div style="text-align: center;">
        <h3>支付申请单</h3>
    </div>
    <div class="row">
        <div class="col-md-3 col-sm-3">项目名称</div>
        <div class="col-md-3 col-sm-3">{$project.name}</div>
        <div class="col-md-3 col-sm-3">项目金额</div>
        <div class="col-md-3 col-sm-3">{$apply.amount}</div>
    </div>
    <div class="row">
        <div class="col-md-3 col-sm-3">付款单位</div>
        <div class="col-md-3 col-sm-3">{$project.paycompany.companyname}</div>
        <div class="col-md-3 col-sm-3">收款单位</div>
        <div class="col-md-3 col-sm-3">{$project.supplier.companyname}</div>
    </div>

    <div class="row">
        <div class="col-md-3 col-sm-3">开工时间</div>
        <div class="col-md-3 col-sm-3">{$project.startdate|datetime='Y-m-d'}</div>
        <div class="col-md-3 col-sm-3">竣工时间</div>
        <div class="col-md-3 col-sm-3">{$project.endate|datetime='Y-m-d'}</div>
    </div>
    <div class="row">
        <div class="col-md-3 col-sm-3">联系单金额</div>
        <div class="col-md-3 col-sm-3">{$apply.addamount}</div>
        <div class="col-md-3 col-sm-3">其它说明</div>
        <div class="col-md-3 col-sm-3">{$project.remarks}</div>
    </div>
    <assign name="TotalAmount" value="0" />
    <div>
        <table class="table table-bordered">
            <tr>
                <th>摘要</th>
                <th>应付款</th>
                <th>已付款</th>
                <th>待付款</th>
                <th>备注</th>
            </tr>

            {foreach name="paylist" item="vo"}
            <tr>
                <td>{$vo.pay.summary}</td>
                <td>{$vo.pay.amount}</td>
                <td>{$vo.pay.paid}</td>
                <td>{$vo.amount}</td>
                <td>{$vo.pay.remark}</td>
                <?php
                     $totalAmount+=$vo['pay']['amount']; 
                     $paidAmount=$paidAmount+$vo['pay']['paid'];
                     $payAmount+=$vo['amount'];
                    ?>
            </tr>

            {/foreach}
            <tr>
                <td>合计</td>
                <td>{$totalAmount}</td>
                <td>{$paidAmount}</td>
                <td>{$payAmount}</td>
                <td></td>
            </tr>
        </table>
    </div>
    <input type="hidden" id="applyid" value="{$row.applyid}" />

</div>


<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <input id="c-applyid" class="form-control" name="row[applyid]" type="hidden" value="{$row.applyid|htmlentities}">

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">同意审核</button>
            <button type="button" class="btn btn-default btn-embossed" onClick="closeLayerWin(this)">{:__('Close')}</button>
        </div>
    </div>
</form>